package com.hdax.dmw.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hdax.dmw.entity.user.LinkUser;
import com.hdax.dmw.user.service.LinkUserService;
import com.hdax.dmw.user.mappers.LinkUserMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author guoyisha
* @description 针对表【dm_link_user(常用联系人表
)】的数据库操作Service实现
* @createDate 2023-06-18 15:13:28
*/
@Service
public class LinkUserServiceImpl extends ServiceImpl<LinkUserMapper, LinkUser>
    implements LinkUserService{

    @Override
    public List<LinkUser> linkUserList(Long userId) {
        return list(new QueryWrapper<LinkUser>()
                .eq("userId",userId));
    }

    @Override
    public LinkUser linkUser(Long linkId, Long userId) {
        return baseMapper.selectLinkUser(linkId, userId);
    }
}




